package cn.hdustea.shopNavigation.ui.model

import cn.hdustea.shopNavigation.entity.Education
import cn.hdustea.shopNavigation.entity.Store
import cn.hdustea.shopNavigation.net.MyService
import cn.hdustea.shopNavigation.ui.contract.EducationContract
import cn.hdustea.shopNavigation.ui.contract.StoreContract
import com.hdustea.base.base.BaseModel
import com.hdustea.base.net.BaseCallback
import com.hdustea.base.net.BaseObserver

/**
 * <pre>
 *     author : HuQiang
 *     time   : 2020/09/22
 *     desc   :
 *     version: 1.0
 * </pre>
 */
class EducationModel : BaseModel(), EducationContract.Model {

    override fun getEducationList(page: Int, callback: BaseCallback<MutableList<Education>>) {
        changeThread(MyService.educationService().getEducation(page),
                object : BaseObserver<MutableList<Education>>(callback) {
                    override fun onNext(t: MutableList<Education>) {
                        callback.callback(t)
                    }
                })
    }

}